// 登录/注册切换动画脚本
function switchAuthTab(tab) {
    const loginForm = document.getElementById('login-form');
    const registerForm = document.getElementById('register-form');
    const loginTab = document.getElementById('login-tab');
    const registerTab = document.getElementById('register-tab');
    if(tab === 'login') {
        loginForm.style.display = 'block';
        registerForm.style.display = 'none';
        loginTab.classList.add('active');
        registerTab.classList.remove('active');
    } else {
        loginForm.style.display = 'none';
        registerForm.style.display = 'block';
        loginTab.classList.remove('active');
        registerTab.classList.add('active');
    }
}

document.addEventListener('DOMContentLoaded', function() {
    // 默认显示登录
    switchAuthTab('login');
    document.getElementById('login-tab').onclick = function() { switchAuthTab('login'); };
    document.getElementById('register-tab').onclick = function() { switchAuthTab('register'); };
});
